package com.java2020.online_mall.service;

import com.java2020.online_mall.dao.AdminDao;
import com.java2020.online_mall.dao.AdminDaoImpl;
import com.java2020.online_mall.model.Admin;
import com.java2020.online_mall.model.AdminPwd;

import java.util.List;

/**
 * @PackgeName: com.java2020.online_mall.service
 * @Author: MNHK
 * Date: 2020/4/28 23:15
 * @Version:1.8
 */

public class AdminServiceImpl implements AdminService{
    private AdminDao adminDao = new AdminDaoImpl();

    @Override
    public int login(Admin admin) {
        return adminDao.login(admin);
    }

    @Override
    public List<Admin> allAdmins() {
        return adminDao.allAdmins();
    }

    @Override
    public List<Admin> getSearchAdmins(Admin params) {
        return adminDao.getSearchAdmins(params);
    }

    @Override
    public Admin getAdminsInfo(String id) {
        return adminDao.getAdminsInfo(id);
    }

    @Override
    public int addAdmins(Admin admin) {
        return adminDao.addAdmins(admin);
    }

    @Override
    public int deleteAdmins(String id) {
        return adminDao.deleteAdmins(id);
    }

    @Override
    public int updateAdmins(Admin admin) {
        return adminDao.updateAdmins(admin);
    }


    @Override
    public int changePwd(AdminPwd adminPwd) {
        return adminDao.changePwd(adminPwd);
    }
}
